<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        //  在声明之后赋值
        var a;
        a = 123;
        console.log(a);

        // 在声明时赋值
        var b = 456;
        console.log(b);

        // 初始化变量但不明确声明
        c = 789;
        console.log(c);
    </script>

    <script>
        // Array
        // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array
        // Array() 构造器
        // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/Array
        var category = new Array(3);
        category[0] = "Soaps";
        category[1] = "Oils";
        category[2] = "Food Products";
        console.log(category[0]);
        console.log(category[1]);
        console.log(category[2]);
    </script>
</head>

<body>

</body>

</html>